const { merge } = require("webpack-merge");
const webpackConfigBase = require("./webpack.config.base");
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");

module.exports = merge(webpackConfigBase, {
  // 指定打包环境
  mode: "production",
  output: {
    filename: 'js/[name].[chunkhash:16].js',
    chunkFilename: 'js/[id].[chunkhash].js',
    publicPath: "/"
  },
  optimization: {
    minimizer: [
      new CssMinimizerPlugin(),
    ]
  },
});